// app/context/AuthContext.js
'use client';
import { createContext, useState } from 'react';

export const AuthContext = createContext();

export const AuthProvider = ({ children }) => {
    const [accessToken, setAccessToken] = useState(null);

    const setToken = (token) => {
        setAccessToken(token);
    };

    return (
        <AuthContext.Provider value={{ accessToken, setToken }}>
            {children}
        </AuthContext.Provider>
    );
};